package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysLogsMapper;
import com.ruoyi.system.domain.SysLogs;
import com.ruoyi.system.service.ISysLogsService;

/**
 * logService业务层处理
 * 
 * @author colin
 * @date 2021-08-11
 */
@Service
public class SysLogsServiceImpl implements ISysLogsService 
{
    @Autowired
    private SysLogsMapper sysLogsMapper;

    /**
     * 查询log
     * 
     * @param id log主键
     * @return log
     */
    @Override
    public SysLogs selectSysLogsById(String id)
    {
        return sysLogsMapper.selectSysLogsById(id);
    }

    /**
     * 查询log列表
     * 
     * @param sysLogs log
     * @return log
     */
    @Override
    public List<SysLogs> selectSysLogsList(SysLogs sysLogs)
    {
        return sysLogsMapper.selectSysLogsList(sysLogs);
    }

    /**
     * 新增log
     * 
     * @param sysLogs log
     * @return 结果
     */
    @Override
    public int insertSysLogs(SysLogs sysLogs)
    {
        sysLogs.setCreateTime(DateUtils.getNowDate());
        return sysLogsMapper.insertSysLogs(sysLogs);
    }

    /**
     * 修改log
     * 
     * @param sysLogs log
     * @return 结果
     */
    @Override
    public int updateSysLogs(SysLogs sysLogs)
    {
        return sysLogsMapper.updateSysLogs(sysLogs);
    }

    /**
     * 批量删除log
     * 
     * @param ids 需要删除的log主键
     * @return 结果
     */
    @Override
    public int deleteSysLogsByIds(String[] ids)
    {
        return sysLogsMapper.deleteSysLogsByIds(ids);
    }

    /**
     * 删除log信息
     * 
     * @param id log主键
     * @return 结果
     */
    @Override
    public int deleteSysLogsById(String id)
    {
        return sysLogsMapper.deleteSysLogsById(id);
    }
}
